/* 支付宝风格样式优化 */
:root {
  --primary-color: #1677ff;
  --primary-gradient: linear-gradient(135deg, #1677ff, #4d9dff);
  --secondary-gradient: linear-gradient(135deg, #34a853, #4caf50);
  --accent-gradient: linear-gradient(135deg, #ffb700, #ffd700);
  --danger-gradient: linear-gradient(135deg, #ff4d4f, #f5222d);
  --card-gradient: linear-gradient(145deg, #ffffff, #fafafa);
  --text-color: #333;
  --text-secondary: #666;
  --border-color: #eee;
  --card-bg: #fff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
  background: #f5f5f5;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 14px;
  min-width: 320px; /* 添加最小宽度防止过度缩放 */
  overflow-x: hidden; /* 防止水平滚动 */
}

.container {
  max-width: 500px;
  min-width: 320px; /* 添加最小宽度 */
  margin: 0 auto;
  padding: 15px 15px 70px;
  min-height: 100vh;
  position: relative;
  box-sizing: border-box;
}

/* 顶部栏优化 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  padding: 10px 0;
}

.back-btn {
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: var(--shadow-md);
}

.balance {
  background: var(--card-bg);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance span {
  color: var(--primary-color);
  font-weight: 600;
}

.msg-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-btn:hover {
  background-color: rgba(22, 119, 255, 0.1);
}

.msg-btn::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger-gradient);
  border-radius: 50%;
}

.msg-icon {
  width: 24px;
  height: 24px;
  fill: #555;
}

/* 功能按钮区域优化 */
.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.grid-item {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.grid-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.grid-item img {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
}

.grid-item p {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 区域标题 */
.section {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
}

.section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  font-weight: 600;
}

/* 历史记录 */
.history-list {
  margin-top: 10px;
}

.history-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item:last-child {
  border-bottom: none;
}

.history-content h4 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.history-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.history-amount {
  font-size: 15px;
  font-weight: 600;
  color: #ff4d4f;
}

/* 广告区域 */
.ad-section {
  margin-top: 20px;
}

.ad-banner {
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  padding: 15px;
  color: white;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.ad-banner img {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  border-radius: 8px;
}

.ad-content h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.ad-content p {
  font-size: 13px;
  opacity: 0.9;
}

/* 二维码区域 */
.qr-section {
  text-align: center;
  margin-bottom: 25px;
}

.qr-container {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: inline-block;
  border: 1px solid var(--border-color);
}

.qr-code {
  width: 180px;
  height: 180px;
  margin: 0 auto 15px;
  background: white;
  padding: 10px;
  border-radius: 8px;
}

.qr-container p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* 支付功能按钮 */
.pay-functions {
  margin-bottom: 25px;
}

.func-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.func-item {
  width: 48%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.func-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.func-item img {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
}

.func-item span {
  font-size: 14px;
  font-weight: 500;
}

/* 支付方式优化 */
.pay-methods {
  margin-bottom: 20px;
}

.method-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  position: relative;
  z-index: 1;
}

.method-item:hover {
  border-color: var(--primary-color);
  background: rgba(22, 119, 255, 0.03);
}

.method-item input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.method-item input[type="radio"]:checked {
  border-color: var(--primary-color);
}

.method-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
}

.method-item label {
  font-size: 15px;
  font-weight: 500;
  margin-right: 12px;
  cursor: pointer;
}

.method-item small {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: auto;
}

.method-item small span {
  color: var(--primary-color);
  font-weight: 500;
}

/* 发现页面样式 */
.discount-grid, .new-user-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.discount-item, .new-user-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.discount-item:hover, .new-user-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.discount-item img, .new-user-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.discount-info, .new-user-info {
  padding: 10px;
}

.discount-info h4, .new-user-info h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.discount-info p, .new-user-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.service-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.service-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-item img {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.service-item p {
  font-size: 12px;
}

.merchant-list {
  margin-top: 10px;
}

.merchant-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.merchant-item:last-child {
  border-bottom: none;
}

.merchant-item img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  margin-right: 12px;
  object-fit: cover;
}

.merchant-info h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.merchant-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 我的页面样式 */
.user-profile {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 3px solid #f0f0f0;
}

.profile-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.profile-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.profile-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.profile-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.profile-item img {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.profile-item p {
  font-size: 12px;
}

.bill-list {
  margin-top: 10px;
}

.bill-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.bill-item:last-child {
  border-bottom: none;
}

.bill-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bill-info h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.bill-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.bill-amount {
  margin-left: auto;
  font-weight: 600;
  color: #ff4d4f;
}

/* 更多页面样式 */
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.more-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.more-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.more-item img {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.more-item p {
  font-size: 12px;
}

.service-list {
  margin-top: 10px;
}

.service-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item img {
  width: 36px;
  height: 36px;
  margin-right: 12px;
}

.service-info h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.service-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 底部导航 - 支付宝风格 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 100;
  padding: 6px 0; /* 修改为合理的内边距 */
  border-top: 1px solid #eee;
  max-width: 500px; /* 添加最大宽度 */
  margin: 0 auto; /* 居中显示 */
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  text-decoration: none;
  color: #999;
  font-size: 11px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item img {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  transition: var(--transition);
}

.nav-item.active img {
  filter: drop-shadow(0 0 2px rgba(22, 119, 255, 0.3));
}

.nav-item span {
  display: block;
}

/* 响应式优化 */
@media (max-width: 500px) {
  .container {
    width: 100%;
    min-width: 100%;
  }
  
  .bottom-nav {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 400px) {
  .function-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .container {
    padding: 15px 10px 70px;
  }
  
  .header {
    margin-bottom: 20px;
  }
  
  .qr-code {
    width: 160px;
    height: 160px;
  }
  
  .discount-grid, .new-user-grid {
    grid-template-columns: 1fr;
  }
  
  .service-grid, .profile-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  
  .more-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .nav-item span {
    font-size: 10px; /* 小屏幕调整字体 */
  }
}

/* 支付宝风格按钮 */
button {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

/* 表单元素样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--card-bg);
  transition: var(--transition);
}

.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.form-group span {
  margin-left: 10px;
}

.redpack-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

/* 公交地铁页面特有样式 */
.transport-card {
  background: linear-gradient(135deg, #1E90FF, #4169E1);
  color: white;
  padding: 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  box-shadow: var(--shadow-md);
}

.card-balance {
  font-size: 1.8em;
  font-weight: bold;
  margin: 10px 0;
}

.card-number {
  font-family: monospace;
  letter-spacing: 2px;
  opacity: 0.9;
}

.transport-qr-code {
  width: 160px;
  height: 160px;
  margin: 20px auto 15px;
  background: white;
  padding: 10px;
  border-radius: 8px;
  display: block;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  gap: 10px;
}

.action-buttons button {
  flex: 1;
}

.transport-history-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.charge-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.charge-amount {
  border: 1px solid #1E90FF;
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: var(--transition);
}

.charge-amount.selected {
  background: #1E90FF;
  color: white;
  border-color: #1E90FF;
}

#custom-amount {
  margin: 15px 0;
}

#charge-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  margin-top: 5px;
}
/* 在文件末尾添加以下样式 */
.transport-card {
  background: linear-gradient(135deg, #1E90FF, #4169E1);
  color: white;
  padding: 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.card-balance {
  font-size: 1.8em;
  font-weight: bold;
  margin: 10px 0;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  gap: 10px;
}

.action-buttons button {
  flex: 1;
}
/* 数字人民币页面样式 */
.rmb-features {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.feature-item {
  text-align: center;
  width: 30%;
}

.feature-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.rmb-qr-section {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

/* 会员页面样式 */
.vip-card {
  background: linear-gradient(135deg, #ffb700, #ffd700);
  color: #333;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow-md);
}

.vip-level {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.level-icon {
  font-size: 36px;
  margin-right: 15px;
}

.vip-progress {
  margin-top: 15px;
}

.progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: #ff6b00;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.points-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.points-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.points-value {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.points-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

.vip-renew-btn {
  width: 100%;
  background: var(--accent-gradient);
  font-size: 16px;
  padding: 12px;
  margin: 20px 0;
}

/* 保险页面样式 */
.policy-list {
  margin-top: 10px;
}

.policy-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.policy-item:last-child {
  border-bottom: none;
}

.policy-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  background: #f0f0f0;
  border-radius: 50%;
}

.policy-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.policy-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.policy-amount {
  margin-left: auto;
  font-weight: 500;
  color: var(--primary-color);
}

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.insurance-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.insurance-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.insurance-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.insurance-info {
  padding: 10px;
}

.insurance-info h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.insurance-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.claim-service {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.claim-item {
  text-align: center;
  width: 30%;
}

.claim-item img {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}

.transfer-remark { 
  color: #666; 
  font-size: 
  0.9em; 
  margin-top: 4px; 
}